import request from '@/utils/request'
// 获取用户列表
export function getList(data) {
  return request({
    url: 'user/user/get_list',
    method: 'get',
    params: data
  })
}
// 修改用户状态
export function change_status(data) {
  return request({
    url: 'user/user/change_status',
    method: 'post',
    params: data
  })
}
// 修改用户信息
export function edit(data) {
  return request({
    url: 'user/user/edit',
    method: 'post',
    params: data
  })
}
// 查看下一级成员信息
export function get_subordinate(data) {
  return request({
    url: 'user/user/get_subordinate',
    method: 'get',
    params: data
  })
}
// 查看我的团队
export function select_team(data) {
  return request({
    url: 'user/user/select_team',
    method: 'get',
    params: data
  })
}
// 绑定上级
export function bind_superior(data) {
  return request({
    url: 'user/user/bind_superior',
    method: 'get',
    params: data
  })
}
// 获取用户成就值变化
export function record_achievement(data) {
  return request({
    url: 'user/achievement_change/record_achievement',
    method: 'post',
    params: data
  })
}
// 获取用户金额列表变化
export function record_amount(data) {
  return request({
    url: 'user/amount_change/record_amount',
    method: 'post',
    params: data
  })
}
// 获取用户提现金额列表
export function get_cash_withdrawal(data) {
  return request({
    url: 'user/cash_withdrawal/get_cash_withdrawal',
    method: 'post',
    params: data
  })
}
// 获取提现管理列表
export function getWithdrawalList(data) {
  return request({
    url: 'pay/pay/getWithdrawalList',
    method: 'post',
    params: data
  })
}
// 同意/拒绝提现
export function business_payment(data) {
  return request({
    url: 'pay/pay/business_payment',
    method: 'post',
    params: data
  })
}
// 获取后台用户点亮省份
export function getUserProvinceList(data) {
  return request({
    url: 'my_world/map/getUserProvinceList',
    method: 'post',
    params: data
  })
}
// 删除用户
export function del(token, data) {
  return request({
    url: 'user/user/delete_user',
    method: 'post',
    params: { token },
    data
  })
}
// 获取用户列表（手动绑定上级的用户）
export function getParentList(token, data) {
  return request({
    url: 'user/user/getParentList',
    method: 'post',
    params: { token },
    data
  })
}
// 修改合伙人收益的状态
export function change_partner(data) {
  return request({
    url: 'user/user/edit_isPartner',
    method: 'post',
    params: data
  })
}

// 获取用户列表（手动绑定上级的用户）
export function get_second_level(token, data) {
  return request({
    url: 'user/user/get_second_level',
    method: 'post',
    params: { token },
    data
  })
}

// 绑定上级（绑定上级）
export function bindSuperior(token, data) {
  return request({
    url: 'user/user/bindSuperior',
    method: 'post',
    params: { token },
    data
  })
}

// 获取Excel
export function getExcel(token, data) {
  return request({
    url: 'user/user/exportData',
    method: 'post',
    params: { token },
    data
  })
}
